From: Samuel Thibault Date: Tue, 12 Oct 2010 09:27:56 +0000 (+0100) Subject: MiniOS: Fix continue; in netfront receive loop X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11406 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=0ad4600ac796b16551ff58ffe68ad83a30cb6da7;p=xen.git MiniOS: Fix continue; in netfront receive loop To properly ignore some requests through the use of continue;, indexes need to be updated. Signed-off-by: Samuel Thibault Signed-off-by: Stefano Stabellini committer: Stefano Stabellini --- diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c index 5674c4ae0f..ade329ee45 100644 --- a/extras/mini-os/netfront.c +++ b/extras/mini-os/netfront.c @@ -105,9 +105,9 @@ moretodo: rmb(); /* Ensure we see queued responses up to 'rp'. */ cons = dev->rx.rsp_cons; - nr_consumed = 0; - some = 0; - while ((cons != rp) && !some) + for (nr_consumed = 0, some = 0; + (cons != rp) && !some; + nr_consumed++, cons++) { struct net_buffer* buf; unsigned char* page; @@ -146,10 +146,6 @@ moretodo: #endif dev->netif_rx(page+rx->offset,rx->status); } - - nr_consumed++; - - ++cons; } dev->rx.rsp_cons=cons;